<%--
author		Christian Würker <Christian.Wuerker@CeuS-Media.de>
since		29.08.2007
version		0.1
--%>
<h2><%heading%></h2>
<%form%>
<table class="panel" width="100%" cellspacing="0">
  <%?caption%>
  <%?colgroup%>
  <tr><td colspan="2">&nbsp;</td></tr>
  <tr><%label_title%>			<%field_title%>			</tr>
  <tr><%label_description%>		<%field_description%>	</tr>
  <tr><%field_button_cancel%>	<%field_buttons%>		</tr>
  <tr><td colspan="2">&nbsp;</td></tr>
</table>
</form>
<script>
function checkObjectRights(objectId,checked)
{
  length	= 6 + 2 + new String( objectId).length;
  string	= "rights["+objectId+"]";
  $(":checkbox[id^=rights]").each(function(){
    id = $(this).attr('id');
    if( id.substr(0,length) == string )
    {
      element	= document.getElementById(id);
      $(element).attr('checked',checked);
    }
  });
}
$(document).ready(function(){
  $(":checkbox[id^=object]").change(function(){
    objectId = $(this).val();
    checked  = $(this).attr('checked') ? true : false;
    checkObjectRights(objectId, checked);
  });
});
</script>